package com.guli.order.feign;

import com.guli.common.utils.R;
import com.guli.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("ware-service")
@Repository
public interface WmsFeignService {

    @GetMapping("/ware/waresku/hasStockAndWeight")
    public R hasStocks(@RequestParam List<Long> skuIds);

    @GetMapping("/ware/wareinfo/fare")
    public R getFare(@RequestParam Long addrId);

    @PostMapping("ware/waresku/lock/order")
    public R orderLockStock(@RequestBody WareSkuLockVo wareSkuLockVo);

    @GetMapping("ware/wareordertask/{orderSn}}")
    public R getOrderTaskIdByOrderSn(@PathVariable String orderSn);

}
